package com.ck.client.service.impl;

import com.ck.client.dao.ProgramReducedLogMapper;
import com.ck.client.service.ProgramReducedLogService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author linqiang
 * @version v1.0
 * @Description 减播Service实现类
 * @date 2019-04-29 16:48
 */
@Service(value = "programReducedLogService")
public class ProgramReducedLogServiceImpl implements ProgramReducedLogService {

    @Autowired
    private ProgramReducedLogMapper programReducedLogMapper;

    /**
     * 列表查询
     *
     * @param deviceCode               终端序列号
     * @param newestProgramVersionList 终端当前播放的节目版本号
     * @return
     */
    @Override
    public List<String> list(String deviceCode, List<String> newestProgramVersionList) {
        if (StringUtils.isBlank(deviceCode)) {
            return new ArrayList<>();
        }
        return programReducedLogMapper.list(deviceCode, newestProgramVersionList);
    }
}
